<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
window.onload=function(){
	//var myform=document.getElementsByName("myform");
	var myform=document.forms[0]
	//alert(myform.method)
	
	//onblur	失去焦点的时候
	//onfocus	获得焦点的时候
	//onchange	当内容改变并且推动焦点的时候
	//onsubmit	当表单提交的时候
	//onreset	当重置的时候
	
};
</script>
</head>

<body>
<form action="" method="post" name="myform">
	<input type="text" name="names" />
</form>
</body>
</html>
